import { createRouter, createWebHistory } from 'vue-router';
import LoginRegister from '../views/LoginRegister.vue';
import PanoramicSituation from '../views/PanoramicSituation/index.vue';
import IntelligentQA from '../views/IntelligentQ&A/index.vue';
import VpsInfo from '../views/vps_info.vue'; 
import DataMonitoring from '../views/DataMonitoring/index.vue'
import DomainPrediction from '../views/PredictionEntry/DomainPrediction.vue';
import IPPrediction from '../views/PredictionEntry/IPPrediction.vue';
import GroupList from '../views/PanoramicSituation/grouplist.vue'
import GroupDetails from '../views/PanoramicSituation/group_details.vue';
import ipresult_ok from '../views/PredictionEntry/resultok.vue';
import ipresult_bad from '../views/PredictionEntry/resultbad.vue';
import ipresult_detail from '../views/PredictionEntry/ipresult_detail.vue' 
const routes = [
  
 
  {
    path: '/group/:id',
    name: 'GroupDetails',
    component: GroupDetails,
    props: true
  },

  {
    path: '/vps-info',
    name: 'VpsInfo',
    component: VpsInfo
  },
  { path: '/login', 
    component: LoginRegister
  },
  {
    path: '/panoramic/panoramic-situation',
    name: 'PanoramicSituation',
    component: PanoramicSituation
  },
  {
    path: '/panoramic/grouplist',
    name: 'GroupList',
    component: GroupList
  },
  {
    path: '/intelligent-qa',
    name: 'IntelligentQA',
    component: IntelligentQA
  },

  {
    path:'/datamonitoring',
    name:'DataMonitoring',
    component:DataMonitoring
  },
  {
    path: '/prediction-entry/domain-prediction',
    name: 'DomainPrediction',
    component: DomainPrediction
  },
  {
    path: '/prediction-entry/ip-prediction',
    name: 'IPPrediction',
    component: IPPrediction
  },
{
        path: '/result/:status',
        name: 'result',
        children: [
            {
                path: 'ok',
                name: 'ipresultok',
                component: ipresult_ok
            },
            {
                path: 'bad',
                name: 'ipresultbad',
                component: ipresult_bad
            }
        ]
    },
    {
        path: '/detail/ip/:predictionResult',
        name: 'IpResultDetail',
        component: ipresult_detail
    }
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
